﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wedo.Domain.Models;
using Wedo.Mvc.Utility;

namespace Wedo.Recognition.Repository
{
    public interface IUserRepository:IRepository<UserInfo>
    {

        IEnumerable<UserInfo> FilterByRole(string role);

        void AddUserWithRole(UserInfo user, List<string> roles);

        void UpdateUserWithRole(UserInfo user, List<string> roles);

        UserInfo GetByName(string name);

        bool Login(string userName, string password);

        bool ChangePassword(string userName, string oldpass, string newPass);

        CurrentUser GetCurrentUser(string name);

        bool IsInResource(string controller, string actionName, string[] roles);

        List<Resource> GetRoleResource(string[] roles);
    }
}
